Inserting elements in a sorted order can lead to a "worst-case" scenario, where the tree degrades into a linked list.
Recall: BST search / insert / delete run in \(O(h)\) where \(h\) is the tree height.
Inserting already sorted data produces a right-skewed tree (reverse-sorted → left-skewed).
Motivation for AVL trees: Detect height imbalances early and perform rotations to keep \(h = \Theta(\log n)\), preserving efficiency.
Behaves like a linked list. Search time is\(O(n)\).
Height is minimized. Search time is\(O(\log n)\).